﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace RestaurantBooker.Controls
{
    public class SingleBitmapButton : Button
    {
        public SingleBitmapButton()
        {
            this.DefaultStyleKey = typeof(SingleBitmapButton);
        }

        #region [ Stretch Property ]
        /// <summary>
        /// The <see cref="Stretch" /> dependency property's name.
        /// </summary>
        public const string StretchPropertyName = "Stretch";

        /// <summary>
        /// Gets or sets the value of the <see cref="Stretch" />
        /// property. This is a dependency property.
        /// </summary>
        public Stretch Stretch
        {
            get
            {
                return (Stretch)GetValue(StretchProperty);
            }
            set
            {
                SetValue(StretchProperty, value);
            }
        }

        /// <summary>
        /// Identifies the <see cref="Stretch" /> dependency property.
        /// </summary>
        public static readonly DependencyProperty StretchProperty = DependencyProperty.Register(
            StretchPropertyName,
            typeof(Stretch),
            typeof(SingleBitmapButton),
            new PropertyMetadata(Stretch.None));

        #endregion

        #region [ Bitmap Property ]
        /// <summary>
        /// The <see cref="NormalBitmap" /> dependency property's name.
        /// </summary>
        public const string BitmapPropertyName = "Bitmap";

        /// <summary>
        /// Gets or sets the value of the <see cref="NormalBitmap" />
        /// property. This is a dependency property.
        /// </summary>
        public ImageSource Bitmap
        {
            get
            {
                return (ImageSource)GetValue(BitmapProperty);
            }
            set
            {
                SetValue(BitmapProperty, value);
            }
        }

        /// <summary>
        /// Identifies the <see cref="NormalBitmap" /> dependency property.
        /// </summary>
        public static readonly DependencyProperty BitmapProperty = DependencyProperty.Register(
            BitmapPropertyName,
            typeof(ImageSource),
            typeof(SingleBitmapButton),
            new PropertyMetadata(null));

        #endregion


    }

}
